---
description: Using Hasura with Heroku Postgres database
title: 'Cloud: Using Hasura Cloud with a Heroku Postgres database'
keywords:
  - hasura
  - docs
  - existing database
  - guide
  - heroku
sidebar_label: Heroku Postgres
sidebar_position: 14
---

import Thumbnail from '@site/src/components/Thumbnail';
import HeadingIcon from '@site/src/components/HeadingIcon';

# Connecting Hasura to a Heroku Postgres Database

## Introduction

This guide explains how to connect a new or existing Postgres database hosted on Heroku to a Hasura instance, either on
[Hasura Cloud](https://cloud.hasura.io?skip_onboarding=true) or [self-hosted](/deployment/deployment-guides/index.mdx).

:::warning

In August of 2022, Heroku announced the
[deprecation of their free resources](https://devcenter.heroku.com/changelog-items/2461). Starting November 28th, 2022,
if you have a Hasura Project connected to a free tier Heroku database, you'll need to either upgrade your Heroku account
or migrate your database to a new database provider.

:::

## Connecting to Heroku

If you are interested in connecting to a Heroku database, our
[Heroku database integration guide](/hasura-cloud/heroku-url-sync.mdx) walks you through each step.

## Alternatives to Heroku

Hasura works well with popular database providers. Most of these providers offer generous free tiers. We have guides you
can use to provision and connect a new database in a matter of minutes. You can check them out
[here](/databases/overview.mdx).

If you're interested in migrating away from Heroku, our different cloud database providers have guides and documentation
to help you:

### Heroku-specific migration guides

- [Crunchy Postgres](https://www.crunchydata.com/migrate-from-heroku)
- [Neon Postgres](https://neon.tech/docs/how-to-guides/hasura-heroku-migration/)
- [Railway Postgres](https://railway.app/heroku)
- [Render Postgres](https://render.com/docs/migrate-from-heroku)
- [Supabase Postgres](https://supabase.com/docs/guides/migrations/heroku)

### General migration guides

- [Aiven Postgres](https://docs.aiven.io/docs/products/postgresql/howto/migrate-pg-dump-restore.html)
- [AWS RDS Aurora](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Migrating.html)
- [AWS RDS Postgres](https://aws.amazon.com/getting-started/hands-on/move-to-managed/migrate-postgresql-to-amazon-rds/)
- [Azure Postgres](https://learn.microsoft.com/en-us/azure/dms/tutorial-postgresql-azure-postgresql-online-portal)
- [DigitalOcean Postgres](https://docs.digitalocean.com/products/databases/postgresql/how-to/migrate/)
- [EnterpriseDB BigAnimal Postgres](https://www.enterprisedb.com/docs/biganimal/latest/migration/cold_migration/)
- [Google Cloud SQL Postgres](https://cloud.google.com/database-migration/docs/postgres)
- [TimescaleDB](https://docs.timescale.com/timescaledb/latest/how-to-guides/migrate-data/)
- [YugabyteDB](https://docs.yugabyte.com/preview/migrate/migrate-steps/)

### FAQs regarding the deprecation of Heroku free resources {#heroku-faqs}

<details>
  <summary>What should I do if I have a free Heroku Postgres database connected to my Hasura Project?</summary>
  Following Heroku’s announcement of deprecation of free resources, you will have to either <a
    href={'https://help.heroku.com/81MBEG7L/how-do-i-upgrade-from-heroku-s-free-tier-and-begin-using-paid-resources'}
  >
    upgrade your Heroku database plan
  </a> or move to a different database provider. Heroku also appears to not be responding to questions from free-tier users.
  <br />
  <br />
  If you have URL sync enabled via our <a href={'/hasura-cloud/heroku-url-sync/'}>Heroku integration</a>
  , you can follow{' '}
  <a href={'https://devcenter.heroku.com/articles/upgrading-heroku-postgres-databases#upgrading-with-pg-copy'}>
    these steps
  </a>{' '}
  - <i>after</i> verifying your Heroku account with a credit card - to migrate your hobby-tier database to a paid tier.
</details>

<details>
  <summary>What should I do if I have a paid Heroku Postgres database connected to my Hasura Project?</summary>
  No other action is required from your end. Your Heroku database will continue to function as before with your Hasura Project.
</details>

<details>
  <summary>How do I add an existing paid database to my Hasura Project?</summary>
  Please follow the <a href={'/hasura-cloud/heroku-url-sync/'}>integration guide here</a>.
</details>

<details>
  <summary>Will upgrading my Heroku database cause downtime?</summary>
  These <a href={'https://devcenter.heroku.com/articles/updating-heroku-postgres-databases'}>docs on the Heroku site</a>
  &nbsp;list the ways a user can upgrade their free Heroku database. As per Heroku’s documentation, it does seem to
  involve some application downtime for successful upgrade and migration.
</details>

<details>
  <summary>What plan should I upgrade to?</summary>
  Heroku Postgres plans and their specifications can be found&nbsp;
  <a href={'https://devcenter.heroku.com/articles/heroku-postgres-plans'}>here</a>. Please choose a plan that would work
  best for your application.
</details>

:::info Note

For more information on which Postgres features we support, check out [this page](/databases/feature-support.mdx).

:::
